// index.ts
import Mock from 'mockjs'
import departmentManagement from './departmentManagement'
import userManagement from './userManagement'
import bigScreen from './bigScreen'

const allMockArr=[
  ...departmentManagement,
  ...bigScreen,
  ...userManagement
]
allMockArr.forEach(item => {
  Mock.mock(item.url, item.type, item.response)
})
// 设置拦截ajax请求的相应时间
Mock.setup({
  timeout: '200-600'
})

Mock.mock('/user/login', 'post', (params: any) => {
  return {
    data: { token: '123' },
    code: 1,
    message: 'success'
  }
})

export default {}
